<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>重新支付订单</title>
    <div data-th-replace="layout/head"></div>
</head>
<body>
    <!-- top bar -->
    <header class="bar bar-nav">
        <a class="button button-link button-nav pull-left goBack" onclick="window.history.go(-1)" href="javascript:void(0);">
            <span class="iconfont icon-fanhui"></span>
        </a>
        <h1 class="title">重新支付订单</h1>
    </header>
    <!-- top bar end-->
    <input type="hidden" id="payType" value=""/>
    <input type="hidden" id="orderNo" th:value="${order['orderNo']}"/>
    <input type="hidden" id="orderType" th:value="${order['orderType']}"/>
    <!--menu begin-->
    <nav class="bar bar-tab course-info-bar-tab">
        <a class="tab-item external" href="#">
            <span class="fs4 c-333">实付</span>
            <span class="fs6 c-red">￥</span>
            <span class="c-red sumPrice" style="font-size: 1rem;" th:text="${order['realPrice']}"></span>
        </a>
        <a id="go-to-pay" class="tab-item external cInfo-price-bx" href="javascript:void(0);">
            <span> 去支付 </span>
        </a>
    </nav>
    <!--menu end-->

    <!--主体区域 开始-->
    <article class="content wm-content order-content">
        <!-- 商品区，开始 -->
        <div>
            <div class="card">
                <section class="card-header">
                    <span><em class="c-bbb iconfont icon-shangpin"></em> 商品信息</span>
                </section>
                <section class="card-content">
                    <div class="list-block media-list">
                        <ul class="order-course-list">
                            <th:block th:each="details : ${order.orderDetailsList}">
                                <th:block th:if="${details['shopType']}=='COURSE'">
                                    <li class="item-content">
                                        <div class="item-media">
                                            <div class="wm-item-picture__wrap pr">
                                                <img class="wm-img" th:src="${details['shop']['course']['imageMap']['mobileUrlMap']['large']}" th:alt="${details['shop']['course']['courseName']}"/>
                                            </div>
                                        </div>
                                        <div class="item-inner">
                                            <div class="item-title">
                                                <span class="fs7 c-666" th:text="${details['shop']['course']['courseName']}"></span>
                                            </div>
                                            <div class="item-after">
                                                <strong class="c-red fs7"><small class="fs4">￥</small>
                                                    <th:block th:text="${#numbers.formatDecimal(details['realPrice'],1,2,'POINT')}"></th:block>
                                                </strong>
                                            </div>
                                        </div>
                                    </li>
                                </th:block>
                                <th:block th:if="${details['shopType']}=='BOOK'">
                                    <li class="item-content">
                                        <div class="item-media">
                                            <div class="wm-item-picture__wrap pr">
                                                <img class="wm-img" th:src="${details['shop']['book']['imageMap']['mobileUrlMap']['large']}" th:alt="${details['shop']['book']['bookName']}"/>
                                            </div>
                                        </div>
                                        <div class="item-inner">
                                            <div class="item-title">
                                                <span class="fs7 c-666" th:text="${details['shop']['book']['bookName']}"></span>
                                            </div>
                                            <div class="item-after">
                                                <strong class="c-red fs7"><small class="fs4">￥</small>
                                                    <th:block th:text="${#numbers.formatDecimal(details['realPrice'],1,2,'POINT')}"></th:block>
                                                </strong>
                                            </div>
                                        </div>
                                    </li>
                                </th:block>
                                <th:block th:if="${details['shopType']}=='MEMBER'">
                                    <li class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title">
                                                <span class="fs7 c-666" th:text="${details['shop']['member']['memberName']}"></span>
                                            </div>
                                            <div class="item-after">
                                                <strong class="c-red fs7"><small class="fs4">￥</small>
                                                    <th:block th:text="${#numbers.formatDecimal(details['realPrice'],1,2,'POINT')}"></th:block>
                                                </strong>
                                            </div>
                                        </div>
                                    </li>
                                </th:block>
                                <th:block th:if="${details['shopType']}=='EXAM'">
                                    <li class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title">
                                                <span class="fs7 c-666" th:text="${details['shop']['exam']['name']}"></span>
                                            </div>
                                            <div class="item-after">
                                                <strong class="c-red fs7"><small class="fs4">￥</small>
                                                    <th:block th:text="${#numbers.formatDecimal(details['realPrice'],1,2,'POINT')}"></th:block>
                                                </strong>
                                            </div>
                                        </div>
                                    </li>
                                </th:block>
                                <th:block th:if="${details['shopType']}=='QA'">
                                    <li class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title">
                                                <span class="fs7 c-666" th:utext="${details['shop']['qa']['context']}"></span>
                                            </div>
                                            <div class="item-after">
                                                <strong class="c-red fs7"><small class="fs4">￥</small>
                                                    <th:block th:text="${#numbers.formatDecimal(details['realPrice'],1,2,'POINT')}"></th:block>
                                                </strong>
                                            </div>
                                        </div>
                                    </li>
                                </th:block>
                                <th:block th:if="${details['shopType']}=='ATTEND'">
                                    <li class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title">
                                                <span class="fs7 c-666" th:utext="${details['shop']['qa']['context']}"></span>
                                            </div>
                                            <div class="item-after">
                                                <strong class="c-red fs7"><small class="fs4">￥</small>
                                                    <th:block th:text="${#numbers.formatDecimal(details['realPrice'],1,2,'POINT')}"></th:block>
                                                </strong>
                                            </div>
                                        </div>
                                    </li>
                                </th:block>
                            </th:block>
                        </ul>
                    </div>
                </section>

                <section class="card-footer">
                    <span class="fs7 c-666">
                        <b class="sumPrice"><b th:text="${order['buyNum']}">0</b>个</b>商品
                    </span>
                    <aside class="text-right">
                        <span class="fs7 c-666">
                            小计<small class="fs4 ml5">￥</small>
                            <b class="sumPrice">
                                <th:block th:text="${#numbers.formatDecimal(order['realPrice'],1,2,'POINT')}"></th:block>
                            </b>
                        </span>
                    </aside>
                </section>
            </div>
        </div>
        <section class="wm-line"></section>
        <!-- 商品区，结束 -->

        <!-- 活动/优惠券，开始 -->
        <th:block>
            <div id="yh-div-box" th:if="${order['orderType']}=='COMMON' and (!${#maps.isEmpty(activity)} or !${#maps.isEmpty(couponCode)})">
                <div class="card">
                    <section class="card-header">
                        <span><em class="c-bbb iconfont icon-youhuiquan"></em> 优惠/活动</span>
                    </section>
                    <section class="card-content">
                        <div class="list-block media-list">
                            <ul class="order-course-list">
                                <li th:if="!${#maps.isEmpty(activity)}" class="item-content" id="hou-dong-bx">
                                    <div class="item-inner">
                                        <div class="item-title">限时活动</div>
                                        <div class="item-input text-right">
                                            <input th:placeholder="${activity['activityName']}" readonly="readonly" type="text"/>
                                        </div>
                                    </div>
                                </li>
                                <li th:if="!${#maps.isEmpty(couponCode)}" class="item-content" id="you-hui-quan-bx">
                                    <div class="item-inner">
                                        <div class="item-title">优惠券</div>
                                        <div class="item-input text-right">
                                            <input th:if="${couponCode['type']}==1" th:placeholder="'满'+${couponCode['minAmount']}+'打'+${couponCode['limitAtion']}+'拆'" readonly="readonly" type="text"/>
                                            <input th:if="${couponCode['type']}==2" th:placeholder="'满'+${couponCode['minAmount']}+'立减'+${couponCode['limitAtion']}" readonly="readonly" type="text"/>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </section>
                </div>
            </div>
            <section class="wm-line"></section>
        </th:block>
        <!-- 活动/优惠券，结束 -->
        <!-- 收货地址，开始 -->
        <th:block th:if="${order['orderType']}=='COMMON' and ${#strings.contains(order['sellTypeList'],'BOOK')}">
            <div>
                <div class="card">
                    <section class="card-header">
                        <span><em class="c-bbb iconfont icon-youhuiquan"></em> 收货地址</span>
                    </section>
                    <section class="card-content">
                        <div class="list-block media-list">
                            <ul class="order-course-list">
                                <li class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title" th:text="${order['orderBook']['address']}"></div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </section>
                </div>
            </div>
            <section class="wm-line"></section>
        </th:block>

        <!-- 收货地址，结束 -->
        <!-- 支付方式，开始 -->
        <div>
            <div class="card">
                <section class="card-header">
                    <span><em class="c-888 iconfont icon-iconzhenghe072907"></em> 支付方式</span>
                </section>
                <section class="card-content">
                    <div class="list-block media-list">
                        <ul class="order-course-list" id="pay-list-box">
                            <th:block th:if="!${#maps.isEmpty(userAccount)} and ${order['orderType']}=='COMMON'">
                                <input type="hidden" th:value="${userAccount['balance']}"/>
                                <li class="item-content" th:attrappend="data-status=${userAccount['balance']} >= ${order['realPrice']} ?'1':'2'" data-type="ACCOUNT">
                                    <div class="item-media">
                                        <span th:classappend="${userAccount['balance']} >= ${order['realPrice']} ?'c-red':'c-bbb'" class="">
                                            <em class="iconfont icon-yue" style="font-size: 1rem;"></em>
                                        </span>
                                    </div>
                                    <div class="item-inner">
                                        <div class="item-title">
                                            <span th:if="${userAccount['balance']} >= ${order['realPrice']}" class="wm-cm-title">账户余额</span>
                                            <span th:if="${order['realPrice']} > ${userAccount['balance']}" class="wm-cm-title">账户余额不足</span>
                                            <span class="c-333" th:text="'￥'+${userAccount['balance']}"></span>
                                        </div>
                                        <div class="item-after">
                                            <span class="dc-icon-bx ok-icon-bx dc-small-icon-bx">
                                                <em class="iconfont icon-duihao"></em>
                                            </span>
                                        </div>
                                    </div>
                                </li>
                            </th:block>
                            <li th:if="!${isWeiXin} and ${configMap['alipayStatus']}=='on'" class="item-content" data-status="1" data-type="ALIPAY">
                                <div class="item-media">
                                    <span class="c-blue"><em class="iconfont icon-zhifubao" style="font-size: 1rem;"></em></span>
                                </div>
                                <div class="item-inner">
                                    <div class="item-title">
                                        <span class="wm-cm-title">支付宝</span>
                                    </div>
                                    <div class="item-after">
                                        <span class="dc-icon-bx ok-icon-bx dc-small-icon-bx"><em class="iconfont icon-duihao"></em></span>
                                    </div>
                                </div>
                            </li>
                            <li th:if="${configMap['weixinStatus']}=='on'" class="item-content" data-status="1" data-type="WEIXIN">
                                <div class="item-media">
                                    <span class="c-green"><em class="iconfont icon-winxin" style="font-size: 1rem;"></em></span>
                                </div>
                                <div class="item-inner">
                                    <div class="item-title">
                                        <span class="wm-cm-title">微信</span>
                                    </div>
                                    <div class="item-after">
                                        <span class="dc-icon-bx ok-icon-bx dc-small-icon-bx">
                                            <em class="iconfont icon-duihao"></em></span>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </section>
                <th:block th:if="${order['orderType']}=='COMMON'">
                    <section th:if="!${#maps.isEmpty(userAccount)} and ${order['realPrice']} >${userAccount['balance']}" class="card-footer">
                        <span class="fs6 c-666"><em class="iconfont icon-tanhao fs4"></em> 账户余额不足，请充值！(<span class="c-red">选择账户支付</span>)</span>
                        <a th:href="@{/mobile/uc/order/initPayOrder?orderType=ACCOUNT&shopData=0-ACCOUNT-1&shareKey=}">立即充值 <em class="icon icon-right"></em></a>
                    </section>
                    <div class="pl5 pr5 pb5 ml5 mr5">
                        <span class="fs4 c-bbb">点击去支付后，如有优惠券，将和此订单绑定，优惠券将设置成已使用</span>
                    </div>
                </th:block>
        </div>
        </div>
        <!-- 支付方式，结束 -->
    </article>
    <div data-th-replace="layout/footer"></div>
    <script type="text/javascript" th:src="@{{path}/front/mobile/business/order/goods/newly-order.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/front/mobile/business/order/goods/validate-order-status.js?v={v}(path=${staticPath},v=${v})}"></script>
<!--主体区域 结束-->
</body>
</html>
